#include <windows.h>
#include <iostream>
 
using namespace std;

int main()
{
	HANDLE file = CreateFile( 
		"a.txt",
		GENERIC_READ | GENERIC_WRITE,
		0,
		NULL,
		CREATE_NEW,
		FILE_ATTRIBUTE_NORMAL,
		NULL
	);

	
	char buf[] = "abc";
	WriteFile(
		file,
		buf,
		sizeof buf - 1,
		NULL,
		NULL
	);

	CloseHandle(file);

	MoveFile("a.txt", "../a.txt");


	return 0;
}
